#!/usr/bin/env node

//在packjson中加type:module,否则运行报错
//但加了别的运行不了
import {readFile} from 'fs/promises';
const file=process.argv[2];
async function main(){
  
  try{
    const content=await readFile(file,'utf8');
    console.log(content);
  }catch(e){
    console.error(e.message);
  }
}

main();
